<?php

namespace app\validate\home;

use app\common\validate\BaseValidate;

/**
 * Class Validate
 * https://www.kancloud.cn/manual/thinkphp6_0/1037624
 * @package app\daily\validate
 */
class Book extends BaseValidate
{
    //定义验证规则
    protected $rule = [
        'store_id|门店id' => 'require|number',
        'game_id|选择陪玩游戏' => 'number',
        'start_time|开始时间' => 'require',
        'end_time|结束时间' => 'require',
        're_id|关联id' => 'require',
        're_type|关联类型' => 'require',
        'per_price|单价' => 'require',
        'duty_date|日期' => 'require',
    ];

    //定义验证场景要与方法名相同走自动验证
    protected $scene = [
        'create' => ['store_id', 'game_id', 're_id', 're_type', 'start_time', 'end_time', 'per_price'],
        'detail' => ['store_id', 're_id', 're_type', 'duty_date'],
    ];

}
